package com.ag.hmk.action;

import java.util.List;

import com.ag.bean.TbGoodstype;
import com.ag.common.BaseAction;
import com.ag.hmk.service.impl.GoodtypeServImpl;
/**
 * 
 * @author hmk
 * 查询物资类型
 */
public class GetGoodTypeAction extends BaseAction {

	private static final long serialVersionUID = 873481L;

	private GoodtypeServImpl goodtypeServImpl;
	private List<TbGoodstype> gtList;
	
	/*
	 * 查询物资类型
	 */
	public String getGoodType()throws Exception{
		List<TbGoodstype> list = null;
		try {
			list = goodtypeServImpl.findAll();
		} catch (Exception e) {
			e.printStackTrace();
			list = null;
		}
		this.setGtList(list);
		System.out.println("-------------获取物资类型成功");
		return "getGoodTypeOK";
	}
	
	public List<TbGoodstype> getGtList() {
		return gtList;
	}
	public void setGtList(List<TbGoodstype> gtList) {
		this.gtList = gtList;
	}
	public void setGoodtypeServImpl(GoodtypeServImpl goodtypeServImpl) {
		this.goodtypeServImpl = goodtypeServImpl;
	}
	
}
